<div class="form-inline">
    <p>
        <input name="busca" id="appendedInputButton" class="span3" type="text" placeholder="Título do documento">&nbsp;
        <?php 
        $estilo = "style='width:300px;'";
        include "mod/combo/doc_are_id.php"; 
        echo "&nbsp;&nbsp;";
        $estilo = "style='width:200px;'";
        include "mod/combo/doc_tip_id.php";
        ?>
        <input type="submit" name="btnbusca" value="Buscar" class="btn" >
    </p>
</div>

<table class="table table-striped table-bordered table-hover">

    <tr>
        <th width="160" height="40">A&ccedil;&otilde;es</th>
        <th>Nome do Arquivo</th>
        <th width="300">Área de Atuação</th>
        <th width="100">Tipo de documento</th>
        <th width="150">Data/Hora</th>
    </tr>

    <?php

    $res = sql("SELECT doc.doc_id,doc.doc_nome,doc.doc_url,docarea.doc_are_nome,doctipo.doc_tip_nome,doc.doc_data,doc.doc_hora 
    FROM doc 
    INNER JOIN docarea ON docarea.doc_are_id=doc.doc_are_id 
    INNER JOIN doctipo ON doctipo.doc_tip_id=docarea.doc_tip_id 
    WHERE $onde 
    ORDER BY doc.doc_id");

    while($linha = mysql_fetch_array($res)) {

    ?>

    <tr>
        <td height="40">

            <input name="excluir[]" type="checkbox" value="<?=$linha['doc_id'];?>"/><i class="icon-trash"></i> Excluir&nbsp;&nbsp;|&nbsp;
            <a href="?pag=doc_alt&doc_id=<?=$linha['doc_id'];?>"><i class="icon-pencil"></i> Editar</a>

        </td>
        <td><a href="<?=$_SESSION['pro_site']."/service/".$linha['doc_url'];?>" target="_blank"><?=$linha['doc_nome'];?></a></td>
        <td><?=$linha['doc_are_nome'];?></td>
        <td><?=$linha['doc_tip_nome'];?></td>
        <td><?=todatabr($linha['doc_data'])." - {$linha['doc_hora']} Z";?></td>
    </tr>

    <?
    } 
    ?>
</table>